package appconfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type AppConfig struct {
	MysqlApp MysqlApp
}
type MysqlApp struct {
	Hort     string
	Username string
	Password string
	Part     int
	Data     string
}

var AppCon AppConfig

func AppInit() {
	viper.SetConfigFile("./dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppCon)
	fmt.Println("动态配置连接成功", AppCon)
}
